<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"
	
	%>
	<%@ page import="java.util.*, training.*"   %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>

<%!
	@Override
	public void init() throws ServletException {

	}

	List<Film> storage;

	void initList() {
		 storage = new ArrayList();
		 storage.add(new Film("Jack Richer"));
		 storage.add(new Film("Oblivion"));
		 storage.add(new Film("MI: Ghost Protocol"));
		 storage.add(new Film("Школьницы 4"));
	}
%>
<body>
	<%
		String path = request.getRequestURI();
	
		initList();
		
		int a = 15;
		int b = 17;
		String greeting = "hello, ";
		int sum = a+b;
		
	
		
		String name = request.getParameter("name");
		out.print(greeting + name );
		out.print(". Printed with out" );
	%>

<a href = "<%=path %>" > path</a>
	<ol>
		<%
			for (int i = 0; i < storage.size(); i++) {
		%>
		<li><%=storage.get(i).getTitle()%></li>
		<%
			}
		%>
	</ol>

	<table border="1">
  <tr>
    <th> name </th>
    <th> value</th>
  </tr>
  <tr>
    <td>param1 </td>
    <td>17 </td>
  </tr>
  <tr>
    <td>param2 </td>
	<td>
	<jsp:include page="main.jsp">
		<jsp:param value="17" name="paramName"/>
		<jsp:param value="18" name="paramName2"/>
	</jsp:include>
     </td>
  </tr>
</table>

	<jsp:include page="main.jsp">
		<jsp:param value="2" name="paramName"/>
		<jsp:param value="100" name="paramName2"/>
	</jsp:include>
	
	<% %>
	
</body>
</html>